OTFree
Frees memory allocated using theOTAlloc
function.C INTERFACE
OSStatus OTFree(void* ptr, OTStructType structType);C++ INTERFACE
OSResult TEndpoint::Free(void* ptr, OTStructType structType);PARAMETERS
ptr
- A pointer to the structure to be deallocated. This is the pointer returned by the
OTAlloc
function.structType
- The name of the structure for which you allocated memory using the
OTAlloc
function. Possible constant names are given by the structure types enumeration. (page 3-47)
DESCRIPTION
In order to use theOTFree
function, you must not have changed the memory allocated by theOTAlloc
function for the structure specified by thestructType
parameter or for any of the buffers to which it points.You are responsible for passing a
structType
parameter that exactly matches the type of structure being freed.The
OTFree
function, along with theOTAlloc
function, is provided mainly for compatibility with XTI.VALID STATES
AllSEE ALSO
TheOTAlloc
function (page 3-92) allocates the memoryOTFree
deallocates.You use one of the constant names given by the structure types enumeration (page 3-47) to specify the structure to be freed.
To allocate raw memory, use the
OTAllocMem
function, and to deallocate the allocated raw memory, use theOTFreeMem
function, both described in the chapter "Process Management."